package com.edu.entity.resource;


import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Resource {
    private  int id;
    private int like;
    private int unlike;
    @DateTimeFormat(pattern = "yyyy-dd-MM HH:mm:ss")
    private Date uploadTime;
    private int downloadCount;
    private int resourcePrice;
    private String resourceName;
    private String attachment;
    private String userId;
    private String resourceTag;
    private String resourceType;
    private String resourcePrimary;
    private String resourceDesc;

    public Resource() {
        super();
    }

    public Resource(int resourcePrice, String resourceName, String attachment, String resourceTag, String resourceType, String resourcePrimary, String resourceDesc) {
        this.resourcePrice = resourcePrice;
        this.resourceName = resourceName;
        this.attachment = attachment;
        this.resourceTag = resourceTag;
        this.resourceType = resourceType;
        this.resourcePrimary = resourcePrimary;
        this.resourceDesc = resourceDesc;
    }

    @Override
    public String toString() {
        return "Resource{" +
                "id=" + id +
                ", like=" + like +
                ", unlike=" + unlike +
                ", uploadTime=" + uploadTime +
                ", downloadCount=" + downloadCount +
                ", resourcePrice=" + resourcePrice +
                ", resourceName='" + resourceName + '\'' +
                ", attachment='" + attachment + '\'' +
                ", userId='" + userId + '\'' +
                ", resourceTag='" + resourceTag + '\'' +
                ", resourceType='" + resourceType + '\'' +
                ", resourcePrimary='" + resourcePrimary + '\'' +
                ", resourceDesc='" + resourceDesc + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLike() {
        return like;
    }

    public void setLike(int like) {
        this.like = like;
    }

    public int getUnlike() {
        return unlike;
    }

    public void setUnlike(int unlike) {
        this.unlike = unlike;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public int getDownloadCount() {
        return downloadCount;
    }

    public void setDownloadCount(int downloadCount) {
        this.downloadCount = downloadCount;
    }

    public int getResourcePrice() {
        return resourcePrice;
    }

    public void setResourcePrice(int resourcePrice) {
        this.resourcePrice = resourcePrice;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getResourceTag() {
        return resourceTag;
    }

    public void setResourceTag(String resourceTag) {
        this.resourceTag = resourceTag;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public String getResourcePrimary() {
        return resourcePrimary;
    }

    public void setResourcePrimary(String resourcePrimary) {
        this.resourcePrimary = resourcePrimary;
    }

    public String getResourceDesc() {
        return resourceDesc;
    }

    public void setResourceDesc(String resourceDesc) {
        this.resourceDesc = resourceDesc;
    }

    public Resource(int id, int like, int unlike, Date uploadTime, int downloadCount, int resourcePrice, String resourceName, String attachment, String userId, String resourceTag, String resourceType, String resourcePrimary, String resourceDesc) {
        this.id = id;
        this.like = like;
        this.unlike = unlike;
        this.uploadTime = uploadTime;
        this.downloadCount = downloadCount;
        this.resourcePrice = resourcePrice;
        this.resourceName = resourceName;
        this.attachment = attachment;
        this.userId = userId;
        this.resourceTag = resourceTag;
        this.resourceType = resourceType;
        this.resourcePrimary = resourcePrimary;
        this.resourceDesc = resourceDesc;
    }
}
